package com.basic;

import jcore.basic.Student;

//子类继承父类的属性
public class SubStudent2 extends Student {
	
	//子类的属性覆盖父类的相同属性
	public int age = 888888;  //私有成员
	
	public SubStudent2(int a) {
		super("Kettel",100L,25);
		//age = a;
		age = a;
	}
	
	////重写父类的方法
	public int getAge(){
		System.out.print("==> 多态: SubStudent2: ");
		return age;
	}
}
